﻿/*
 * XCoder v3.4.2011.0316
 * 作者：nnhy/X
 * 时间：2011-04-04 11:54:06
 * 版权：版权所有 (C) 新生命开发团队 2010
*/
using System;
using System.Collections.Generic;
using System.ComponentModel;
using XCode;
using XCode.DataAccessLayer;

namespace NXCMS.CMS
{
	/// <summary>
	/// 注释
	/// </summary>
	[Serializable]
	[DataObject]
	[Description("注释")]
	[BindTable("Comment", Description = "注释", ConnName = "CMS", DbType = DatabaseType.SqlServer)]
	public partial class Comment
	{
		#region 属性
		private Int32 _ID;
		/// <summary>
		/// 编号
		/// </summary>
		[Description("编号")]
		[DataObjectField(true, true, false, 10)]
		[BindColumn(1, "ID", "编号", "", "int", 10, 0, false)]
		public Int32 ID
		{
			get { return _ID; }
			set { if (OnPropertyChange("ID", value)) _ID = value; }
		}

		private Int32 _RelaID;
		/// <summary>
		/// 关系编号
		/// </summary>
		[Description("关系编号")]
		[DataObjectField(false, false, false, 10)]
		[BindColumn(2, "RelaID", "关系编号", "", "int", 10, 0, false)]
		public Int32 RelaID
		{
			get { return _RelaID; }
			set { if (OnPropertyChange("RelaID", value)) _RelaID = value; }
		}

		private Int32 _CatalogID;
		/// <summary>
		/// 类别编号
		/// </summary>
		[Description("类别编号")]
		[DataObjectField(false, false, false, 10)]
		[BindColumn(3, "CatalogID", "类别编号", "", "int", 10, 0, false)]
		public Int32 CatalogID
		{
			get { return _CatalogID; }
			set { if (OnPropertyChange("CatalogID", value)) _CatalogID = value; }
		}

		private Int32 _CatalogType;
		/// <summary>
		/// 类别类型
		/// </summary>
		[Description("类别类型")]
		[DataObjectField(false, false, false, 10)]
		[BindColumn(4, "CatalogType", "类别类型", "", "int", 10, 0, false)]
		public Int32 CatalogType
		{
			get { return _CatalogType; }
			set { if (OnPropertyChange("CatalogType", value)) _CatalogType = value; }
		}

		private Int32 _SiteID;
		/// <summary>
		/// 站点编号
		/// </summary>
		[Description("站点编号")]
		[DataObjectField(false, false, false, 10)]
		[BindColumn(5, "SiteID", "站点编号", "", "int", 10, 0, false)]
		public Int32 SiteID
		{
			get { return _SiteID; }
			set { if (OnPropertyChange("SiteID", value)) _SiteID = value; }
		}

		private String _Title;
		/// <summary>
		/// 标题
		/// </summary>
		[Description("标题")]
		[DataObjectField(false, false, false, 100)]
		[BindColumn(6, "Title", "标题", "", "nvarchar(100)", 0, 0, true)]
		public String Title
		{
			get { return _Title; }
			set { if (OnPropertyChange("Title", value)) _Title = value; }
		}

		private String _Content;
		/// <summary>
		/// 内容
		/// </summary>
		[Description("内容")]
		[DataObjectField(false, false, false, 1000)]
		[BindColumn(7, "Content", "内容", "", "nvarchar(1000)", 0, 0, true)]
		public String Content
		{
			get { return _Content; }
			set { if (OnPropertyChange("Content", value)) _Content = value; }
		}

		private String _AddUser;
		/// <summary>
		/// 添加用户
		/// </summary>
		[Description("添加用户")]
		[DataObjectField(false, false, false, 200)]
		[BindColumn(8, "AddUser", "添加用户", "", "nvarchar(200)", 0, 0, true)]
		public String AddUser
		{
			get { return _AddUser; }
			set { if (OnPropertyChange("AddUser", value)) _AddUser = value; }
		}

		private String _AddUserIP;
		/// <summary>
		/// 添加用户地址
		/// </summary>
		[Description("添加用户地址")]
		[DataObjectField(false, false, false, 50)]
		[BindColumn(9, "AddUserIP", "添加用户地址", "", "nvarchar(50)", 0, 0, true)]
		public String AddUserIP
		{
			get { return _AddUserIP; }
			set { if (OnPropertyChange("AddUserIP", value)) _AddUserIP = value; }
		}

		private DateTime _AddTime;
		/// <summary>
		/// 添加时间
		/// </summary>
		[Description("添加时间")]
		[DataObjectField(false, false, false, 7)]
		[BindColumn(10, "AddTime", "添加时间", "", "datetime2", 7, 0, false)]
		public DateTime AddTime
		{
			get { return _AddTime; }
			set { if (OnPropertyChange("AddTime", value)) _AddTime = value; }
		}

		private String _VerifyFlag;
		/// <summary>
		/// 验证标记
		/// </summary>
		[Description("验证标记")]
		[DataObjectField(false, false, true, 1)]
		[BindColumn(11, "VerifyFlag", "验证标记", "", "nvarchar(1)", 0, 0, true)]
		public String VerifyFlag
		{
			get { return _VerifyFlag; }
			set { if (OnPropertyChange("VerifyFlag", value)) _VerifyFlag = value; }
		}

		private String _VerifyUser;
		/// <summary>
		/// 验证用户
		/// </summary>
		[Description("验证用户")]
		[DataObjectField(false, false, true, 200)]
		[BindColumn(12, "VerifyUser", "验证用户", "", "nvarchar(200)", 0, 0, true)]
		public String VerifyUser
		{
			get { return _VerifyUser; }
			set { if (OnPropertyChange("VerifyUser", value)) _VerifyUser = value; }
		}

		private DateTime _VerifyTime;
		/// <summary>
		/// 验证时间
		/// </summary>
		[Description("验证时间")]
		[DataObjectField(false, false, true, 7)]
		[BindColumn(13, "VerifyTime", "验证时间", "", "datetime2", 7, 0, false)]
		public DateTime VerifyTime
		{
			get { return _VerifyTime; }
			set { if (OnPropertyChange("VerifyTime", value)) _VerifyTime = value; }
		}

		private String _Prop1;
		/// <summary>
		/// 属性1
		/// </summary>
		[Description("属性1")]
		[DataObjectField(false, false, true, 50)]
		[BindColumn(14, "Prop1", "属性1", "", "nvarchar(50)", 0, 0, true)]
		public String Prop1
		{
			get { return _Prop1; }
			set { if (OnPropertyChange("Prop1", value)) _Prop1 = value; }
		}

		private String _Prop2;
		/// <summary>
		/// 属性2
		/// </summary>
		[Description("属性2")]
		[DataObjectField(false, false, true, 50)]
		[BindColumn(15, "Prop2", "属性2", "", "nvarchar(50)", 0, 0, true)]
		public String Prop2
		{
			get { return _Prop2; }
			set { if (OnPropertyChange("Prop2", value)) _Prop2 = value; }
		}

		private Int32 _SupporterCount;
		/// <summary>
		/// 上端口错误数量
		/// </summary>
		[Description("上端口错误数量")]
		[DataObjectField(false, false, true, 10)]
		[BindColumn(16, "SupporterCount", "上端口错误数量", "", "int", 10, 0, false)]
		public Int32 SupporterCount
		{
			get { return _SupporterCount; }
			set { if (OnPropertyChange("SupporterCount", value)) _SupporterCount = value; }
		}

		private Int32 _AntiCount;
		/// <summary>
		/// 反对数量
		/// </summary>
		[Description("反对数量")]
		[DataObjectField(false, false, true, 10)]
		[BindColumn(17, "AntiCount", "反对数量", "", "int", 10, 0, false)]
		public Int32 AntiCount
		{
			get { return _AntiCount; }
			set { if (OnPropertyChange("AntiCount", value)) _AntiCount = value; }
		}

		private String _SupportAntiIP;
		/// <summary>
		/// 上端口反对地址
		/// </summary>
		[Description("上端口反对地址")]
		[DataObjectField(false, false, true, 1073741823)]
		[BindColumn(18, "SupportAntiIP", "上端口反对地址", "", "ntext", 0, 0, true)]
		public String SupportAntiIP
		{
			get { return _SupportAntiIP; }
			set { if (OnPropertyChange("SupportAntiIP", value)) _SupportAntiIP = value; }
		}

		private String _BackupNo;
		/// <summary>
		/// 备份编号
		/// </summary>
		[Description("备份编号")]
		[DataObjectField(false, false, true, 15)]
		[BindColumn(19, "BackupNo", "备份编号", "", "nvarchar(15)", 0, 0, true)]
		public String BackupNo
		{
			get { return _BackupNo; }
			set { if (OnPropertyChange("BackupNo", value)) _BackupNo = value; }
		}

		private String _BackupOperator;
		/// <summary>
		/// 备份操作者
		/// </summary>
		[Description("备份操作者")]
		[DataObjectField(false, false, true, 200)]
		[BindColumn(20, "BackupOperator", "备份操作者", "", "nvarchar(200)", 0, 0, true)]
		public String BackupOperator
		{
			get { return _BackupOperator; }
			set { if (OnPropertyChange("BackupOperator", value)) _BackupOperator = value; }
		}

		private DateTime _BackupTime;
		/// <summary>
		/// 备份时间
		/// </summary>
		[Description("备份时间")]
		[DataObjectField(false, false, true, 7)]
		[BindColumn(21, "BackupTime", "备份时间", "", "datetime2", 7, 0, false)]
		public DateTime BackupTime
		{
			get { return _BackupTime; }
			set { if (OnPropertyChange("BackupTime", value)) _BackupTime = value; }
		}

		private String _BackupMemo;
		/// <summary>
		/// 备份注释
		/// </summary>
		[Description("备份注释")]
		[DataObjectField(false, false, true, 50)]
		[BindColumn(22, "BackupMemo", "备份注释", "", "nvarchar(50)", 0, 0, true)]
		public String BackupMemo
		{
			get { return _BackupMemo; }
			set { if (OnPropertyChange("BackupMemo", value)) _BackupMemo = value; }
		}
		#endregion

		#region 获取/设置 字段值
		/// <summary>
		/// 获取/设置 字段值。
		/// 一个索引，基类使用反射实现。
		/// 派生实体类可重写该索引，以避免反射带来的性能损耗
		/// </summary>
		/// <param name="name">字段名</param>
		/// <returns></returns>
		public override Object this[String name]
		{
			get
			{
				switch (name)
				{
					case "ID" : return _ID;
					case "RelaID" : return _RelaID;
					case "CatalogID" : return _CatalogID;
					case "CatalogType" : return _CatalogType;
					case "SiteID" : return _SiteID;
					case "Title" : return _Title;
					case "Content" : return _Content;
					case "AddUser" : return _AddUser;
					case "AddUserIP" : return _AddUserIP;
					case "AddTime" : return _AddTime;
					case "VerifyFlag" : return _VerifyFlag;
					case "VerifyUser" : return _VerifyUser;
					case "VerifyTime" : return _VerifyTime;
					case "Prop1" : return _Prop1;
					case "Prop2" : return _Prop2;
					case "SupporterCount" : return _SupporterCount;
					case "AntiCount" : return _AntiCount;
					case "SupportAntiIP" : return _SupportAntiIP;
					case "BackupNo" : return _BackupNo;
					case "BackupOperator" : return _BackupOperator;
					case "BackupTime" : return _BackupTime;
					case "BackupMemo" : return _BackupMemo;
					default: return base[name];
				}
			}
			set
			{
				switch (name)
				{
					case "ID" : _ID = Convert.ToInt32(value); break;
					case "RelaID" : _RelaID = Convert.ToInt32(value); break;
					case "CatalogID" : _CatalogID = Convert.ToInt32(value); break;
					case "CatalogType" : _CatalogType = Convert.ToInt32(value); break;
					case "SiteID" : _SiteID = Convert.ToInt32(value); break;
					case "Title" : _Title = Convert.ToString(value); break;
					case "Content" : _Content = Convert.ToString(value); break;
					case "AddUser" : _AddUser = Convert.ToString(value); break;
					case "AddUserIP" : _AddUserIP = Convert.ToString(value); break;
					case "AddTime" : _AddTime = Convert.ToDateTime(value); break;
					case "VerifyFlag" : _VerifyFlag = Convert.ToString(value); break;
					case "VerifyUser" : _VerifyUser = Convert.ToString(value); break;
					case "VerifyTime" : _VerifyTime = Convert.ToDateTime(value); break;
					case "Prop1" : _Prop1 = Convert.ToString(value); break;
					case "Prop2" : _Prop2 = Convert.ToString(value); break;
					case "SupporterCount" : _SupporterCount = Convert.ToInt32(value); break;
					case "AntiCount" : _AntiCount = Convert.ToInt32(value); break;
					case "SupportAntiIP" : _SupportAntiIP = Convert.ToString(value); break;
					case "BackupNo" : _BackupNo = Convert.ToString(value); break;
					case "BackupOperator" : _BackupOperator = Convert.ToString(value); break;
					case "BackupTime" : _BackupTime = Convert.ToDateTime(value); break;
					case "BackupMemo" : _BackupMemo = Convert.ToString(value); break;
					default: base[name] = value; break;
				}
			}
		}
		#endregion

		#region 字段名
		/// <summary>
		/// 取得注释字段名的快捷方式
		/// </summary>
		public class _
		{
			///<summary>
			/// 编号
			///</summary>
			public const String ID = "ID";

			///<summary>
			/// 关系编号
			///</summary>
			public const String RelaID = "RelaID";

			///<summary>
			/// 类别编号
			///</summary>
			public const String CatalogID = "CatalogID";

			///<summary>
			/// 类别类型
			///</summary>
			public const String CatalogType = "CatalogType";

			///<summary>
			/// 站点编号
			///</summary>
			public const String SiteID = "SiteID";

			///<summary>
			/// 标题
			///</summary>
			public const String Title = "Title";

			///<summary>
			/// 内容
			///</summary>
			public const String Content = "Content";

			///<summary>
			/// 添加用户
			///</summary>
			public const String AddUser = "AddUser";

			///<summary>
			/// 添加用户地址
			///</summary>
			public const String AddUserIP = "AddUserIP";

			///<summary>
			/// 添加时间
			///</summary>
			public const String AddTime = "AddTime";

			///<summary>
			/// 验证标记
			///</summary>
			public const String VerifyFlag = "VerifyFlag";

			///<summary>
			/// 验证用户
			///</summary>
			public const String VerifyUser = "VerifyUser";

			///<summary>
			/// 验证时间
			///</summary>
			public const String VerifyTime = "VerifyTime";

			///<summary>
			/// 属性1
			///</summary>
			public const String Prop1 = "Prop1";

			///<summary>
			/// 属性2
			///</summary>
			public const String Prop2 = "Prop2";

			///<summary>
			/// 上端口错误数量
			///</summary>
			public const String SupporterCount = "SupporterCount";

			///<summary>
			/// 反对数量
			///</summary>
			public const String AntiCount = "AntiCount";

			///<summary>
			/// 上端口反对地址
			///</summary>
			public const String SupportAntiIP = "SupportAntiIP";

			///<summary>
			/// 备份编号
			///</summary>
			public const String BackupNo = "BackupNo";

			///<summary>
			/// 备份操作者
			///</summary>
			public const String BackupOperator = "BackupOperator";

			///<summary>
			/// 备份时间
			///</summary>
			public const String BackupTime = "BackupTime";

			///<summary>
			/// 备份注释
			///</summary>
			public const String BackupMemo = "BackupMemo";
		}
		#endregion
	}
}